package APP2.bookshop.order;
import java.util.ArrayList;
import java.util.Set;
import java.util.HashSet;
import java.util.Date;
import java.util.List;

public class OrderInfo
{
        private int code;
        private Date orderDate;
	private Date deliveryDate;
	private double price;
	private List<Order> order;
	
	public OrderInfo(int code, Date order, Date delivery, double price){
            this.order = new ArrayList<Order>();
            this.code = code;
            this.orderDate = order;
            this.deliveryDate = delivery;
            this.price = price;
	}

        public int getCode() {
            return this.code;
        }
	public Date getOrderDate() {
            return this.orderDate;
	}
	
	public Date getDeliveryDate() {
            return this.deliveryDate;
	}
	
	public double getPrice() {
            return this.price;
	}
        public List<Order> getOrder() {
            return this.order;
        }

        public void addOrder(Order o) {
            this.order.add(o);
        }

        @Override
        public String toString() {
            return Integer.toString(code) + "#" + this.orderDate.toString();
        }
	
}

